<?php


namespace App\Request\client;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class NumberRecordRequest extends CommonRequest
{
    protected $name = '商户登录信息';

    protected $rule = [
        'add' => [
            'code_number' => 'required',
            'host_name' => 'required',
            'company' => 'required',
            'today_date' => 'required',
            'today_time' => 'required',
            'action_type' => 'required',
        ],
    ];

    protected $message = [
        'code_number.required' => '码号不能为空',
        'host_name.required' => '主机名不能为空',
        'company.required' => '公司不能为空',
        'today_date.required' => '当天日期不能为空',
        'today_time.required' => '当天时间不能为空',
        'action_type.required' => '动作不能为空',
    ];

    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}